home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
BARNET
/
COMPILER
/
SATHER
/
!Sather
/
Library
/
Containrs
/
sa
/
pq
< prev
next >
Wrap
Text File
|
1996-04-09
|
1KB
|
33 lines
---------------------------> Sather 1.1 source file <--------------------------
-- Copyright (C) 1995, International Computer Science Institute
-- $Id: pq.sa,v 1.3 1996/04/09 10:05:20 borisv Exp $
--
-- COPYRIGHT NOTICE: This code is provided WITHOUT ANY WARRANTY
-- and is subject to the terms of the SATHER LIBRARY GENERAL PUBLIC
-- LICENSE contained in the file: Sather/Doc/License of the
-- Sather distribution. The license is also available from ICSI,
-- 1947 Center St., Suite 600, Berkeley CA 94704, USA.
-------------------------------------------------------------------
abstract class $PQ{T < $IS_LT{T}} < $DISPENSER{T} is
-- Standard priority queue abstraction. Returns the element with
-- the highest priority
top: T;
-- Return the top element of the queue.
pop: T;
-- Remove and return the top most element (alias for "remove")
insert(e: T);
-- Insert the element "e" into the priority queue
clear;
-- Remove all elements from the queue
is_empty: BOOL;
-- Return true if the queue is empty
end;
-------------------------------------------------------------------